<!DOCTYPE html>
<html>
<head>
    <title>终端列表</title>
    <#include "/header.html">
    <link type="text/css" rel="stylesheet" href="${request.contextPath}/statics/plugins/layui/css/layui.css">
    <style>
        th {
            text-align: center;
        }

        .form-control {
            margin-left: 5px;
        }
    </style>

</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">

            <div class="form-group">
                <div class="layui-inline" style="width: 120px">
                    <select class="layui-input layui-unselect" v-model="q.state">
                        <option v-for="state in this.states" :value="state.value">{{state.msg}}</option>
                    </select>
                </div>
                <div class="layui-inline">
                    <input type="button" class="btn btn-primary form-control" @click="query" value="查询"/>
                </div>
                <div class="layui-inline">
                    <input type="button" class="btn btn-primary form-control" @click="clean" value="刷新"/>
                </div>
                <div class="layui-inline">
                    <input type="button" class="btn btn-primary form-control" @click="add" value="新增"/>
                </div>
                <div class="layui-inline">
                    <input type="button" class="btn btn-primary form-control" @click="update" value="修改"/>
                </div>
                <div class="layui-inline">
                    <input type="button" class="btn btn-primary form-control" @click="showCover" value="查看封面"/>
                </div>
            </div>
            <table id="jqGrid"></table>

            <div id="jqGridPager"></div>


        </div>
    </div>

    <div v-show="showImgList" id="imgList">
        <div class="grid-btn">

            <div class="form-group">
                <div class="layui-inline">
                    <input type="button" class="btn btn-primary form-control" @click="clean" value="返回"/>
                </div>
            </div>
            <table id="imgGrid" width="100%"></table>

            <div id="imgGridPager"></div>


        </div>
    </div>


    <div v-show="showUpdate" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">id</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="share.shareId" readonly="readonly"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">创作时间</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" readonly="readonly" id="shareDate"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">状态</div>
                <div class="col-sm-10">
                    <select class="layui-input layui-unselect" v-model="share.state">
                        <option v-for="state in this.states" :value="state.value">{{state.msg}}</option>
                    </select>
                </div>
            </div>
            <div class="form-group" v-show="showAdd">
                <div class="col-sm-2 control-label">封面图片</div>
                <div class="col-sm-10">
                    <input type="file" name="file" multiple id="cover"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">内容</div>
                <div class="col-sm-10">
                   <textarea class="form-control" v-model="share.content">

                   </textarea>
                </div>
            </div>


            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="modify" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>


</div>

<script src="${request.contextPath}/statics/js/modules/share/shareList.js?_${.now?long}"></script>
<script src="${request.contextPath}/statics/plugins/layui/layui.js"></script>
<script>
    layui.use('laydate',function () {
        var laydate = layui.laydate;

        //常规用法
        laydate.render({
            elem: '#shareDate',
            format: 'yyyy-MM-dd',
            value: new Date(),
            done:function (value,date) {
                vm.share.shareDate=value;
            }
        });
    })

</script>
</body>
<div id="content" style="display: none;width: 375px;height: 667px">

</div>
<img src="" width="720px" height="auto" style="display: none;" id="goodsImg">

<div id="imgForm" style="display: none;width: 100%">
    <form style="width: 90%;margin-left: 5%;margin-top: 10%" class="form-group" >
        <input type="file" name="file" class="form-control" placeholder="请选择文件" />
    </form>
</div>
<div class="layui-carousel" id="goodBanner" style="display: none;width: 1125px;height: 630px">
    <div carousel-item id="bannerContent">
        <div></div>
    </div>
</div>

</html>